<template>
	<!-- 增加todox任务项 -->
	<div class="todoAdd">
		<!-- <input type="text" v-model="item" /> -->
		<!-- 绑定事件处理函数为传过来的函数，并传参 -->
		<!-- <button @click="addItem(item)">+</button> -->
		<van-field
			v-model="item"
			center
	        label="任务项"
			placeholder="请输入"
		>
		<template #button>
			<van-button size="small" type="primary" @click="addItem(item)">增加</van-button>
		</template>
		</van-field>
	</div>
</template>

<script>
	export default {
		data(){
			return{
				item:"输入任务"
			}
		},
		props:{
			addItem:Function,
		}
	}
	
</script>

<style>
</style>
